package com.adrian.service.impl;

import com.adrian.mapper.ProductTypeMapper;
import com.adrian.pojo.Type;
import com.adrian.service.ProductTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Auther: Adrian
 * @Date: 2020/3/20 21:58
 * @Description:
 */
@Service
public class ProductTypeServiceImpl implements ProductTypeService {

    @Autowired
    private ProductTypeMapper productTypeMapper;
    @Override
    public List<Type> getTypes() {
        return productTypeMapper.getTypes();
    }

    @Override
    public int addType(Type type) {
        return productTypeMapper.addType(type);
    }

    @Override
    public int updateType(Type type) {
        return productTypeMapper.updateType(type);
    }

    @Override
    public Type getById(int tid) {
        return productTypeMapper.getById(tid);
    }

    @Override
    public int deleteType(int tid) {
        return productTypeMapper.deleteType(tid);
    }
}
